<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: sync.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('sync_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">sync.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>EtherCAT sync manager methods.  
<a href="#details">More...</a></p>

<p><a href="sync_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae554464367e3ca0d6c2c402ee52461de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#ae554464367e3ca0d6c2c402ee52461de">ec_sync_init</a> (<a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync, <a class="el" href="globals_8h.html#a8d9ffff7dbe1babaa4786a63f2860d57">ec_slave_t</a> *slave)</td></tr>
<tr class="memdesc:ae554464367e3ca0d6c2c402ee52461de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#ae554464367e3ca0d6c2c402ee52461de">More...</a><br /></td></tr>
<tr class="separator:ae554464367e3ca0d6c2c402ee52461de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05bfac9d6981a210919a1bed7aa10090"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#a05bfac9d6981a210919a1bed7aa10090">ec_sync_init_copy</a> (<a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync, const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *other)</td></tr>
<tr class="memdesc:a05bfac9d6981a210919a1bed7aa10090"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#a05bfac9d6981a210919a1bed7aa10090">More...</a><br /></td></tr>
<tr class="separator:a05bfac9d6981a210919a1bed7aa10090"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad78623bc3b479121c5fa77acacd0c823"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#ad78623bc3b479121c5fa77acacd0c823">ec_sync_clear</a> (<a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync)</td></tr>
<tr class="memdesc:ad78623bc3b479121c5fa77acacd0c823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ad78623bc3b479121c5fa77acacd0c823">More...</a><br /></td></tr>
<tr class="separator:ad78623bc3b479121c5fa77acacd0c823"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addb7fcc84fa000b0b41f4a2801977b21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#addb7fcc84fa000b0b41f4a2801977b21">ec_sync_page</a> (const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync, uint8_t sync_index, uint16_t data_size, const <a class="el" href="structec__sync__config__t.html">ec_sync_config_t</a> *sync_config, uint8_t pdo_xfer, uint8_t *data)</td></tr>
<tr class="memdesc:addb7fcc84fa000b0b41f4a2801977b21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a sync manager configuration page.  <a href="#addb7fcc84fa000b0b41f4a2801977b21">More...</a><br /></td></tr>
<tr class="separator:addb7fcc84fa000b0b41f4a2801977b21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cf8d891a77f09cc5dbb820b08bca55c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#a5cf8d891a77f09cc5dbb820b08bca55c">ec_sync_add_pdo</a> (<a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync, const <a class="el" href="structec__pdo__t.html">ec_pdo_t</a> *pdo)</td></tr>
<tr class="memdesc:a5cf8d891a77f09cc5dbb820b08bca55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a PDO to the list of known mapped PDOs.  <a href="#a5cf8d891a77f09cc5dbb820b08bca55c">More...</a><br /></td></tr>
<tr class="separator:a5cf8d891a77f09cc5dbb820b08bca55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af820aa0417e581742c1ac9b65231c9da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ApplicationInterface.html#ga703c4e47384b3601e7605d6d910aaba1">ec_direction_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8c.html#af820aa0417e581742c1ac9b65231c9da">ec_sync_default_direction</a> (const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *sync)</td></tr>
<tr class="memdesc:af820aa0417e581742c1ac9b65231c9da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the default direction from the control register.  <a href="#af820aa0417e581742c1ac9b65231c9da">More...</a><br /></td></tr>
<tr class="separator:af820aa0417e581742c1ac9b65231c9da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>EtherCAT sync manager methods. </p>

<p class="definition">Definition in file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae554464367e3ca0d6c2c402ee52461de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae554464367e3ca0d6c2c402ee52461de">&#9670;&nbsp;</a></span>ec_sync_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_sync_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="globals_8h.html#a8d9ffff7dbe1babaa4786a63f2860d57">ec_slave_t</a> *&#160;</td>
          <td class="paramname"><em>slave</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>EtherCAT sync manager. </td></tr>
    <tr><td class="paramname">slave</td><td>EtherCAT slave. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00046">46</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
<a id="a05bfac9d6981a210919a1bed7aa10090"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05bfac9d6981a210919a1bed7aa10090">&#9670;&nbsp;</a></span>ec_sync_init_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_sync_init_copy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>other</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>EtherCAT sync manager. </td></tr>
    <tr><td class="paramname">other</td><td>Sync manager to copy from. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00063">63</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
<a id="ad78623bc3b479121c5fa77acacd0c823"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad78623bc3b479121c5fa77acacd0c823">&#9670;&nbsp;</a></span>ec_sync_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_sync_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>EtherCAT sync manager. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00081">81</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
<a id="addb7fcc84fa000b0b41f4a2801977b21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addb7fcc84fa000b0b41f4a2801977b21">&#9670;&nbsp;</a></span>ec_sync_page()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_sync_page </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>sync_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>data_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structec__sync__config__t.html">ec_sync_config_t</a> *&#160;</td>
          <td class="paramname"><em>sync_config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pdo_xfer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes a sync manager configuration page. </p>
<p>The referenced memory (<em>data</em>) must be at least <em>EC_SYNC_SIZE</em> bytes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>Sync manager. </td></tr>
    <tr><td class="paramname">sync_index</td><td>Index of the sync manager. </td></tr>
    <tr><td class="paramname">data_size</td><td>Data size. </td></tr>
    <tr><td class="paramname">sync_config</td><td>Configuration. </td></tr>
    <tr><td class="paramname">pdo_xfer</td><td>Non-zero, if PDOs will be transferred via this sync manager. </td></tr>
    <tr><td class="paramname">data</td><td><blockquote class="doxtable">
<p>Configuration memory. </p>
</blockquote>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00094">94</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
<a id="a5cf8d891a77f09cc5dbb820b08bca55c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cf8d891a77f09cc5dbb820b08bca55c">&#9670;&nbsp;</a></span>ec_sync_add_pdo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_sync_add_pdo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structec__pdo__t.html">ec_pdo_t</a> *&#160;</td>
          <td class="paramname"><em>pdo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a PDO to the list of known mapped PDOs. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on success, else &lt; 0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>EtherCAT sync manager. </td></tr>
    <tr><td class="paramname">pdo</td><td>PDO to map. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00153">153</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
<a id="af820aa0417e581742c1ac9b65231c9da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af820aa0417e581742c1ac9b65231c9da">&#9670;&nbsp;</a></span>ec_sync_default_direction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ApplicationInterface.html#ga703c4e47384b3601e7605d6d910aaba1">ec_direction_t</a> ec_sync_default_direction </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structec__sync__t.html">ec_sync_t</a> *&#160;</td>
          <td class="paramname"><em>sync</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines the default direction from the control register. </p>
<dl class="section return"><dt>Returns</dt><dd>Direction. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync</td><td>EtherCAT sync manager. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sync_8c_source.html#l00167">167</a> of file <a class="el" href="sync_8c_source.html">sync.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="sync_8c.html">sync.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
